﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.CTP.CommerceAPI.SDKSample.Client.Configurations;
using System.ComponentModel.DataAnnotations;

namespace TestWebApplication
{
    public class ConnectorModel
    {
        public ConnectorModel()
        {
            CTPServer = CTPClientConfiguration.CTPServer;
            CTPAzureCertFile = CTPClientConfiguration.CTPAzureCertFile;
            CTPAzureCertPassword = CTPClientConfiguration.CTPAzureCertPassword;
            CTPWinPhoneCertFile = CTPClientConfiguration.CTPWinPhoneCertFile;
            CTPWinPhoneCertPassword = CTPClientConfiguration.CTPWinPhoneCertPassword;
            CTPO365CertFile = CTPClientConfiguration.CTPO365CertFile;
            CTPO365CertPassword = CTPClientConfiguration.CTPO365CertPassword;
            CTPTestCertFile = CTPClientConfiguration.CTPTestCertFile;
            CTPTestCertPassword = CTPClientConfiguration.CTPTestCertPassword;
        }

        [Required(ErrorMessage = "CTP Server is required.")]
        [Display(Name = "CTP Server")]
        public string CTPServer { get; set; }

        [Required(ErrorMessage = "Azure Certificate File is required.")]
        [Display(Name = "Azure Certificate File")]
        public string CTPAzureCertFile { get; set; }

        [Required(ErrorMessage = "Azure Certificate File Password is required.")]
        [Display(Name = "Azure Certificate File Password")]
        public string CTPAzureCertPassword { get; set; }

        [Required(ErrorMessage = "Windows Phone Certificate File is required.")]
        [Display(Name = "Windows Phone Certificate File")]
        public string CTPWinPhoneCertFile { get; set; }

        [Required(ErrorMessage = "Windows Phone Certificate File Password is required.")]
        [Display(Name = "Windows Phone Certificate File Password")]
        public string CTPWinPhoneCertPassword { get; set; }

        [Required(ErrorMessage = "O365 Certificate File is required.")]
        [Display(Name = "O365 Certificate File")]
        public string CTPO365CertFile { get; set; }

        [Required(ErrorMessage = "O365 Certificate File Password is required.")]
        [Display(Name = "O365 Certificate File Password")]
        public string CTPO365CertPassword { get; set; }

        [Required(ErrorMessage = "Test Certificate File is required.")]
        [Display(Name = "Test Certificate File")]
        public string CTPTestCertFile { get; set; }

        [Required(ErrorMessage = "Test Certificate File Password is required.")]
        [Display(Name = "Test Certificate File Password")]
        public string CTPTestCertPassword { get; set; }
    }
}